﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BlueFlyPhone
{
    public class PressureUnitConverter : IUnitConverter
    {

        public static PressureUnitConverter Current;

        static PressureUnitConverter()
        {
            Current = new PressureUnitConverter();
        }

        double conversionFactor = 100; //Pa to hPa

        public  double ConvertToCalculationUnits(double value)
        {
            return value * conversionFactor;
        }

        public  string ConvertToDisplayUnits(double value, int precision)
        {
            return Math.Round(value / conversionFactor, precision).ToString();
        }


        public string DisplayUnit
        {
            get { return "hPA"; }
        }
    }

}
